from django.db import models


# Create your models here.
class data_sensor(models.Model):
    id = models.IntegerField('id', primary_key=True)
    sensor_id = models.IntegerField('sensor_id', null=False)
    user_id = models.IntegerField('user_id', null=False)
    data = models.CharField('data', null=False, max_length=15)
    time = models.DateTimeField('time', null=False)

    class Meta:
        db_table = 'data_sensor'


class datas(models.Model):
    id = models.IntegerField('id', primary_key=True)
    data = models.FloatField('data', null=False)
    time = models.CharField('time', null=False, max_length=255)
    pi = models.CharField('pi', null=False, max_length=255)

    class Meta:
        db_table = 'datas'


class trace(models.Model):
    id = models.IntegerField('id', primary_key=True)
    x = models.IntegerField('x', null=False)
    y = models.IntegerField('y', null=False)
    pi = models.CharField('pi', null=False, max_length=255)

    class Meta:
        db_table = 'trace'